//显示具体数据的方法
$(function(){
    $.getJSON('../json/ownComment.json',function(response){
        var pageSize=response.length 
        var ul=document.getElementById('products')
        var strHTML=''
        for(var i=0 ; i<pageSize ; i++){
            if(response[i]){
                strHTML+=`<li onclick="window.open('heathChild.html')">
                            <div class="cook-img">
                                <a href=""><img src="${response[i].image}" alt=""></a>
                            </div>
                            <div class="comments">
                                <a href="" class="title">${response[i].name}</a><br>

                                <span>我的评论：</span>
                                <a href="" class="mycomment">${response[i].mycomment}</a>
                                <p class="createtime" >${response[i].time}</p>
                            </div>
                        </li>`
            }
        }
        ul.innerHTML=strHTML
    })
})